import http from "../utils/request"
import qs from "qs";
// login
const adminlogin = (data) => {
    return http.request({
        url: '/login',
        method: 'post',
        data: qs.stringify(data),
        contentType: "application/x-www-form-urlencoded"
    })
}

//退出
const logout = () => {
  return http.request({
    url: '/logout',
    headers: { "Authorization": localStorage.getItem("adminToken") },
    method: 'post',
    data: {}
  })
}

export { adminlogin, logout }
